package com.yonyougov.devops.cruxcisupport.appenv.dto;

import com.yonyougov.devops.fwc.api.dto.BaseRequestDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;

@Data
@ApiModel("增加环境应用请求")
public class AppEnvAddRequestDto extends BaseRequestDto {

    @NotNull
    @ApiModelProperty(required = true, name = "健康检查")
    private Boolean healthCheck;

    @ApiModelProperty(name = "镜像")
    private String image;

    @ApiModelProperty(required = true, name = "版本")
    private String packageVersion;

    @NotNull
    @ApiModelProperty(required = true, name = "实例数")
    private Integer replicas;

    @NotNull
    @ApiModelProperty(required = true, name = "是否使用适配器")
    private Boolean useAdapter;

    @NotNull
    @ApiModelProperty(required = true, name = "应用id")
    private BigInteger appId;

    @NotNull
    @ApiModelProperty(required = true, name = "环境id")
    private BigInteger envId;

    @ApiModelProperty(required = true, name = "应用的总数量")
    private Integer containerTotal;

    @ApiModelProperty(required = true, name = "重启次数")
    private Integer restartNum;

    @ApiModelProperty(required = true, name = "运行中应用的数量")
    private Integer runContainerNum;

    @ApiModelProperty(required = true, name = "应用的状态")
    private String state;
}
